<template>
	<view>
		<u-tabs :list="list1" @click="click"></u-tabs>
		<u-search v-model="searchData.packageName" :showAction="true" actionText="搜索" :animation="true"
			@search="toSearch" @custom="toSearch"></u-search>


	</view>
</template>

<script>
	import {
		orderListApi
	} from '@/api/index.js'
	export default {
		data() {
			return {
				keyword: "",
				list1: [{
					name: '待支付',
				}, {
					name: '已支付',
				}, {
					name: '已完成'
				}, {
					name: '已关闭'
				}, {
					name: '订购失败'
				}, {
					name: '退款失败'
				}],
				searchData: {
					orderNo: "",
					orderState: "",
					payState: "",
					packageName: "",
					pageNum: 1,
					pageSize: 10,
					orderByColumn: "create_time",
					isAsc: "desc"
				}
			}
		},
		onLoad() {
			this.orderList();
		},
		methods: {
			// 搜索
			toSearch() {

			},
			click() {

			},
			// 查询订单列表
			async orderList() {
				const res = await orderListApi(this.searchData);
				console.log(res, '查询订单列表');
			}
		}
	}
</script>

<style>

</style>